package com.icss.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.icss.dao.ItemCategoryDao;
import com.icss.model.ItemCategory;
import com.icss.service.ItemCategoryService;
@Service
@Component
public class ItemCategoryServiceImpl implements ItemCategoryService{
	@Autowired
	ItemCategoryDao icd;
	@Override
	public boolean add(ItemCategory itemCategory) {
		return icd.add(itemCategory)>0?true:false;
	}
	@Override
	public ItemCategory findById(int id) {
		return icd.findById(id);
	}
	@Override
	public List<ItemCategory> findByPage(Map<String, Integer>map) {
		return icd.findByPage(map);
	}
	@Override
	public List<ItemCategory> findAll() {
		return icd.findAll();
	}
	@Override
	public boolean del(int id) {
		// TODO Auto-generated method stub
		return icd.del(id)>0?true:false;
	}
	@Override
	public boolean update(ItemCategory i) {
		// TODO Auto-generated method stub
		return icd.update(i)>0?true:false;
	}

}
